package edu.neusoft.yuejian_09.service;

import java.util.List;

import edu.neusoft.yuejian_09.bean.Train;
import edu.neusoft.yuejian_09.bean.TrainOrder;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;

/**
 * Created by 爽 on 2017/10/12.
 */

public interface TrainService {
    //获取培训列表
    @GET("Train/getTrainList")
    Call<List<Train>> getAllTrains();
    //获取菜鸟培训列表
    @GET("Train/getCainiaoTrain")
    Call<List<Train>> getCainiaoTrain();
    //获取进阶培训列表
    @GET("Train/getJinjieTrain")
    Call<List<Train>> getJinjieTrain();
    //获取入门培训列表
    @GET("Train/getRumenTrain")
    Call<List<Train>> getRumenTrain();
    //获取培训详情
    @GET("Train/getTrainInfo")
    Call<Train> getTrainById(
            @Query("train_id") int train_id
    );
    //搜索培训课程
    @GET("Train/searchTrain")
    Call<List<Train>> getTrainBySearch(
            @Query("search") String search
    );
    //购买课程
    @GET("Train/addtrainn")
    Call<TrainOrder> insertOrder(
            @Query("user_id") int user_id,
            @Query("train_id") int train_id
    );
}
